
package src;

import java.util.Scanner;

import boundary.IMenu;
import boundary.Menu;
import controller.IMenuController;
import controller.MenuController;
import controller.OperatorLoginController;
import data.Data;
import data.IData;
import functionality.ITransmitter;
import functionality.Transmitter;

public class Main {

	public static void main(String[] args) {
		
		if (args.length == 0){ // Hvis ingen host og port er valgt forudsættes det at Scale.exe kører på localHost port 4567
			args = new String[2]; 
			args[0] = "localHost";
			args[1] = "4567";
		}

		Scanner scanner = new Scanner(System.in);
		
		IData data = new Data();
		ITransmitter transmit = new Transmitter(data);
		OperatorLoginController oprLogin = new OperatorLoginController(args, transmit); 
		IMenu menu = new Menu(scanner);
		IMenuController control = new MenuController(menu, oprLogin, transmit, args);

		control.run();		
	}
}